#include "guish.hpp"
#ifndef FILERECEIVER_HPP
#define FILERECEIVER_HPP

class FileReceiver
	:public StreamReceiver
{
public:
	FileReceiver(RemoteHost *source, const RPCParams *params);
	~FileReceiver();
	
	void recv(int len, const char *data);
	void onClose();
	void disconnected();
	
	void finished();
	void cancelled();
	
protected:
	void reportError(string message);
	
	string filename;
	int id;
	FILE *file;
};

#endif
